var BASEURL = "<?php echo base_url(); ?>";
var ASSETS_URL = "<?php echo site_info('assets_url'); ?>";
var userLogged = <?php echo $this->user->is_loggedIn() ? 1 : 0; ?>;
$(function () {
    <?php if (!$screen_size = $this->session->userdata('SCREEN_SIZE')) { ?>
    $.post(BASEURL+'js/store_screen_size',{width:screen.width,height:screen.height},function(r){})
    <?php }else{ ?>
       if(<?php echo $screen_size['width']; ?> != screen.width || <?php echo $screen_size['height']; ?> != screen.height){
            $.post(BASEURL+'js/store_screen_size',{width:screen.width,height:screen.height},function(r){})
       }
    <?php } ?>
})